<!-- Main content -->
<section class="" ng-init="getSingle()">
    <form ng-if="viewmodel" ng-class="{'submitted': submitted}" ng-submit="save()">
        <actions preview-url="viewmodel.fullPath" back-url="'/portal/configuration/list'"></actions>

        <div class="row justify-content-md-center">
            <div class="card mb-4 col-lg-6">
                <h6 class="card-header">Create new configuration</h6>
                <div class="card-body">
                    <div class="row">
                        <section class="col-lg-12">
                            <div class="mb-3">
                                <label class="form-label">Keyword</label>
                                <input type="text" required class="form-control" ng-model="viewmodel.keyword" />
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Description</label>
                                <textarea type="text" class="form-control" ng-model="viewmodel.description"></textarea>
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Category</label>
                                <select class="form-select" ng-model="viewmodel.category">
                                    <option ng-repeat="item in cates" ng-value="item">
                                        {{item}}
                                    </option>
                                </select>
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Type</label>
                                <mix-select model="viewmodel.property.dataType" options="settings.dataTypes"
                                    callback="initEditors(type)">
                                </mix-select>
                            </div>
                            <div class="mb-3">
                                <label class="form-label">Value</label>
                                <module-form-editor data="viewmodel.property" column-title="viewmodel.title"
                                    input-class="me-2">
                                </module-form-editor>
                            </div>
                        </section>
                    </div>
                </div>
            </div>
        </div>
    </form>
</section>
<!-- /.content -->